<template>
	<view>
		<u-gap height="40" bg-color="#ffffff"></u-gap>
		<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
			<view class="u-m-r-10">
				<u-avatar :src="pic" size="140"></u-avatar>
			</view>
			<view class="u-flex-1">
				<view class="u-font-18 u-p-b-20">陈奕好</view>
				<view class="u-font-14 u-tips-color">ID：184173632</view>
			</view>
		</view>

		<view class="u-m-t-20">
			<u-cell-group>
				<u-cell-item @click="openPage('/pages/center/updateinfo')" icon="account" title="修改个人联系方式"></u-cell-item>
				<u-cell-item @click="openPage('/pages/callpolice/history')" icon="warning" title="我的报警"></u-cell-item>
				<u-cell-item @click="openPage('/pages/center/prize')" icon="gift-fill" title="中奖历史"></u-cell-item>
			</u-cell-group>
		</view>
		<u-gap height="500"></u-gap>
		<view class="u-m-t-20">
			<u-cell-group>
				<u-button @click="Logout('pages/index/login')">退出登录</u-button>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				pic: '',
				show: true,
				name: '',
				reputation: '',
				form:{
					bookNumber:''
				}
			}
		},
		onReady(){
			
		},
		onLoad() {
			
		},
		onShow(){
			
		},
		created() {
			
		},
		computed: {
			current() {
				return this.show ? 0 : 1;
			}
		},
		methods: {
			openPage(path) {
				uni.navigateTo({
					url: path
				})
			},
			Logout(path) {
				getApp().globalData.userNumber = "";
				this.$u.route({
					url: path,
					type: 'redirectTo'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #ededed;
	}

	.camera {
		width: 54px;
		height: 44px;

		&:active {
			background-color: #ededed;
		}
	}

	.user-box {
		background-color: #fff;
	}
</style>
